﻿<!--#include file="const.inc"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>
<%
if sid="Null" then
Response.Redirect "/login.asp?sid="&sidd&"&url=/game/sangon/index.asp"
else

dim id,tuda
	id=Request.QueryString("id")
	if id="" then id=1
	if not isnumeric(id) then id=1
	id=clng(id)

select case v
case "0"
we0="<br/>"
hr="----------------<br/>"
%>
<card id="main" title="诈金花"><p align="<%=qingtian.px%>">
<%
case "1"
zi="<span style=""color:#FF5500"">"
zi0="</span>"
we="<div class=""footer"">"
sou="<div class=""block4"">"
dao="<div class=""navi"">"
we0="</div>"
we1="</div>"
%>
<title>诈金花</title>
</head>
<body>
<!--#include virtual="/css.inc"-->
<%
End Select
qingtian.info
sangong.tj
sangong.pd(id)
if Request.QueryString("act")=1 then
        tuda=0
	Set Rs = Server.CreateObject("Adodb.Recordset")
	Sql = "select * from qingtian_fangd where pid="&id&""
	Rs.Open Sql,cn,1,1
        if rs.RecordCount<14 then tuda=1
	Rs.close
        set rs=nothing
        if tuda=1 then
	                Set Rs = Server.CreateObject("Adodb.Recordset")
			Sql = "select * from qingtian_fangd"
			Rs.Open Sql,cn,1,3
	rs.addnew
        rs("time")=now
	rs("pid")=id
	rs.update
	aid=rs("id")
	Rs.close
set rs=nothing
Response.Redirect "gamedd.asp?pid="&id&"&id="&aid&"&sid="&sidd&""
end if
end if
%>
<%=dao%>[请选择游戏房间]<a href='fangdd.asp?id=<%=id%>&amp;sid=<%=sidd%>'>刷新</a><%=we0%>
<%=we%>=二人混战区(最多2人)=<%=we0%><%=dao%>
<%
select case id
case "8"
%>
新手|<a href='fangdd.asp?id=7&amp;sid=<%=sidd%>'>普通</a>|<a href='fangdd.asp?id=6&amp;sid=<%=sidd%>'>高手</a>|<a href='fangdd.asp?id=5&amp;sid=<%=sidd%>'>VIP</a>
<%
case "7"
%>
<a href='fangdd.asp?id=8&amp;sid=<%=sidd%>'>新手</a>|普通|<a href='fangdd.asp?id=6&amp;sid=<%=sidd%>'>高手</a>|<a href='fangdd.asp?id=5&amp;sid=<%=sidd%>'>VIP</a>
<%
case "6"
%>
<a href='fangdd.asp?id=8&amp;sid=<%=sidd%>'>新手</a>|<a href='fangdd.asp?id=7&amp;sid=<%=sidd%>'>普通</a>|高手|<a href='fangdd.asp?id=5&amp;sid=<%=sidd%>'>VIP</a>
<%
case "5"
%>
<a href='fangdd.asp?id=8&amp;sid=<%=sidd%>'>新手</a>|<a href='fangdd.asp?id=7&amp;sid=<%=sidd%>'>普通</a>|<a href='fangdd.asp?id=6&amp;sid=<%=sidd%>'>高手</a>|VIP
<%
End Select
%>
<%=we0%>
<%=sou%>
<%=zi%>底金:<%=int(sangong.namejian("money",id)/10)%> 封顶:<%=int(sangong.namejian("money",id)*3)%><%=zi0%><br/>
当前游戏在线人数<%=zi%><%=sangong.online%><%=zi0%><br/>
<%=we0%><%=hr%><%=we%>
<%

dim sql,rs,i,strrt
	                Set Rs = Server.CreateObject("Adodb.Recordset")
			Sql = "select [id],[ton],[time] from qingtian_fangd where pid="&id&" order by [id] asc"
			Rs.Open Sql,cn,1,3
			if not (rs.bof and rs.eof)  then
			For i=1 to rs.RecordCount
                        if DATEDIFF("h", rs("time"), now())>24 and (sangong.moname(rs("id"))="" or sangong.moname(rs("id"))="暂无玩家") then
                        rs.delete
                        else
                        Response.Write("第"&i&"卓|玩家("&sangong.moname(rs("id"))&")<br/>状态:"&sangong.motonton(rs("ton"),rs("id"),id)&"<br/>")
                        end if
			Rs.MoveNext
			next
			end if
			Rs.close
			Sql = "select top 1 [id] from qingtian_fangd where pid="&id&" and ton=0 order by [id] asc"	
			Rs.Open Sql,cn,1,1
			if not (rs.bof and rs.eof)  then
                        strrt="gamedd.asp?pid="&id&"&amp;id="&rs("id")&"&amp;sid="&sidd&""
                        else
                        strrt="fangdd.asp?id="&id&"&amp;act=1&amp;sid="&sidd&""                        
			end if
			Rs.close		
		        set rs=nothing
%><%=hr%>
你的<%=sangong.tonn%><%=we0%><%=hr%><%=qingtian.liaotian(id+1005555)%><%=sou%>
<a href='fangdd.asp?id=<%=id%>&amp;act=1&amp;sid=<%=sidd%>'>开卓</a>|<a href='<%=strrt%>'>配对</a>|<a href='new.asp?sid=<%=sidd%>'>排行</a>|<a href='main1.asp?sid=<%=sidd%>'>成绩</a><br/><a href="index.asp?sid=<%=sidd%>">诈金花首页</a>.<a href="/game/index.asp?sid=<%=sidd%>">游戏大厅</a><%=we0%>
<%
end if
end function
%>